From ef3b5ca73593e5078f1456ca438845d3fe08dd99 Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Wed, 9 Jul 2014 19:37:41 +0200 Subject: [PATCH] Adwaita: vertically linked buttons --- gtk/resources/theme/Adwaita/_common.scss | 26 ++++++++++++++++--- .../theme/Adwaita/gtk-contained-dark.css | 12 +++++++++ gtk/resources/theme/Adwaita/gtk-contained.css | 12 +++++++++ 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/gtk/resources/theme/Adwaita/_common.scss b/gtk/resources/theme/Adwaita/_common.scss index cdf07841d2..3a3da7cc1e 100644 --- a/gtk/resources/theme/Adwaita/_common.scss +++ b/gtk/resources/theme/Adwaita/_common.scss @@ -350,9 +350,13 @@ GtkLabel { .linked &, .linked &:hover, .linked &:active, - .linked &:backdrop { - @extend %linked_buttons; - } + .linked &:backdrop { @extend %linked_buttons; } + + .linked.vertical &, + .linked.vertical &:hover, + .linked.vertical &:active, + .linked.vertical &:backdrop { @extend %linked_buttons_vertical; } + } // all the following is for the +|- buttons on inline toolbars, that way @@ -415,6 +419,22 @@ GtkLabel { } } +%linked_buttons_vertical{ + border-left-style: solid; + border-top-style: none; + &:first-child { + border-style: solid; + border-radius: 3px 3px 0 0; + } + &:last-child { + border-radius: 0 0 3px 3px; + } + &:only-child { + border-radius: 3px; + border-style: solid; + } +} + %undecorated_button { border-color: transparent; background-color: transparent; diff --git a/gtk/resources/theme/Adwaita/gtk-contained-dark.css b/gtk/resources/theme/Adwaita/gtk-contained-dark.css index fa5118dc28..a2f91da032 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/resources/theme/Adwaita/gtk-contained-dark.css @@ -571,6 +571,18 @@ border-radius: 3px; border-style: solid; } +.linked.vertical .button, .linked.vertical .button:hover, .linked.vertical .button:active, .linked.vertical .button:backdrop { + border-left-style: solid; + border-top-style: none; } + .linked.vertical .button:first-child { + border-style: solid; + border-radius: 3px 3px 0 0; } + .linked.vertical .button:last-child { + border-radius: 0 0 3px 3px; } + .linked.vertical .button:only-child { + border-radius: 3px; + border-style: solid; } + .button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover, .scale-popup .button:hover, .scale-popup .button:backdrop, .scale-popup .button:backdrop:hover, .scale-popup .button:backdrop:insensitive { border-color: transparent; background-color: transparent; diff --git a/gtk/resources/theme/Adwaita/gtk-contained.css b/gtk/resources/theme/Adwaita/gtk-contained.css index 0dfca69016..55168300eb 100644 --- a/gtk/resources/theme/Adwaita/gtk-contained.css +++ b/gtk/resources/theme/Adwaita/gtk-contained.css @@ -563,6 +563,18 @@ border-radius: 3px; border-style: solid; } +.linked.vertical .button, .linked.vertical .button:hover, .linked.vertical .button:active, .linked.vertical .button:backdrop { + border-left-style: solid; + border-top-style: none; } + .linked.vertical .button:first-child { + border-style: solid; + border-radius: 3px 3px 0 0; } + .linked.vertical .button:last-child { + border-radius: 0 0 3px 3px; } + .linked.vertical .button:only-child { + border-radius: 3px; + border-style: solid; } + .button.flat, .button.flat:backdrop, .menuitem.button.flat, .menuitem.button.flat:backdrop, .menuitem.button.flat:backdrop:hover, .button:link, .button:visited, .button:link:hover, .button:link:active, .button:visited:hover, .button:visited:active, .button:link:backdrop, .button:visited:backdrop, .notebook tab .button, GtkCalendar.button, GtkCalendar.button:hover, GtkCalendar.button:backdrop, GtkCalendar.button:backdrop:hover, .scale-popup .button:hover, .scale-popup .button:backdrop, .scale-popup .button:backdrop:hover, .scale-popup .button:backdrop:insensitive { border-color: transparent; background-color: transparent; -- 2.30.2